<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %><%--
  Created by IntelliJ IDEA.
  User: 92460
  Date: 2020/12/18
  Time: 10:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@  taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>测试foreach遍历Map</title>
</head>
<body>
<%
    Map<String,String> maps = new HashMap<>();
    maps.put("one","tom");
    maps.put("two","jerry");
    maps.put("three","jim");
    pageContext.setAttribute("maps",maps);
%>

<p>用户表如下</p>
<c:forEach items="${pageScope.maps}" var="entry">
   <p>${entry.key}:${entry.value}</p>
</c:forEach>
<c:forEach begin="1" end="5" step="2">
</c:forEach>
</body>
</html>